package com.ygsoft.activiti.eunm;

/**
 * activiti枚举
 * 部署流程状态定义  挂起 1  激活 2  失败 -1
 * @author zhx
 * @create 2017-11-20 13:59
 **/
public enum ActivitProccessEnum {

    SUSPEND("挂起", 1), UNSUSPEND("激活", 2), ERRORSTATUS("失败", -1);

    //构造方法
    private ActivitProccessEnum(String name, int index) {
        this.str = name;
        this.status = index;
    }
    //获取普通方法
    public static String getName(int status) {
        for (ActivitProccessEnum c : ActivitProccessEnum.values()) {
            if (c.status == status) {
                return c.str;
            }
        }
        return null;
    }

    private String str;
    private int status;

    public String getStr() {
        return str;
    }

    public void setStr(String str) {
        this.str = str;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }
}
